package site.zhouinfo.SingletonPattern;

/**
 * 静态内部类 单例模式
 *
 * @author zhou
 * @Create Date 2016/12/13 16:05
 */
public class Singleton {
    private Singleton() {
    }

    public static Singleton getSingleton() {
        return Holder.singleton;
    }

    private static class Holder {
        private static Singleton singleton = new Singleton();
    }
}
